package com.gane.maple.dao;

import com.gane.maple.entity.User;
import com.gane.maple.jdbc.routing.ClientDataSource;
import com.gane.maple.jdbc.routing.annotation.DataSourceRouting;

/**
 * @Description UserDAO
 * @Date 2020/4/24 7:39
 * @Created by 王弘博
 */
public interface UserDAO {

    @DataSourceRouting(value = ClientDataSource.MASTER)
    User selectByUserId(String userId);

    @DataSourceRouting(value = ClientDataSource.SLAVE)
    User selectByUserName(String userName);

    User selectByUserIdWithoutDataSourceRouting(String userId);

    User selectByUserNameWithoutDataSourceRouting(String userName);
}
